package com.bustle.user.dto.authentication;

import javax.ejb.EJB;
import javax.ejb.Local;
import javax.ejb.Stateless;

import com.bustle.commons.Mapper;

@Local
public interface AuthenticationDtoMapper extends Mapper<AuthenticationDto, AuthenticationDto>
{
  @Stateless
  static public class DefaultAuthenticationDtoMapper implements AuthenticationDtoMapper
  {
    @Override
    public AuthenticationDto map(AuthenticationDto aSource, AuthenticationDto aDestination)
    {
      return dataToDtoMapConverter.map(dtoToDataMapConverter.convert(aSource), aDestination);
    }

    @EJB
    protected DtoToAuthenticationMapConverter dtoToDataMapConverter;
    @EJB
    protected AuthenticationToDtoMapConverter dataToDtoMapConverter;
  }
}
